Import('RTT_ROOT')
Import('rtconfig')
from building import *

cwd     = GetCurrentDir()

src = Glob('Micro-XRCE-DDS-Client/src/c/core/log/*.c')
src += Glob('Micro-XRCE-DDS-Client/src/c/core/serialization/*.c')
src += Glob('Micro-XRCE-DDS-Client/src/c/core/session/*.c')
src += Glob('Micro-XRCE-DDS-Client/src/c/core/session/stream/*.c')
src += Glob('Micro-XRCE-DDS-Client/src/c/profile/transport/custom/custom_transport.c')
src += Glob('Micro-XRCE-DDS-Client/src/c/profile/transport/stream_framing/*.c')
src += Glob('Micro-XRCE-DDS-Client/src/c/util/*.c')
src += Glob('Micro-CDR/src/c/*.c')
src += Glob('Micro-CDR/src/c/types/*.c')
# Example Source
src += Glob('Micro-XRCE-DDS-Client/examples/PingPong/Header.c')
src += Glob('Micro-XRCE-DDS-Client/examples/PingPong/Time.c')
src += Glob('Micro-XRCE-DDS-Client/examples/PingPong/pingpong_main.c')

LOCAL_CPPPATH = [cwd + '/Micro-XRCE-DDS-Client//src/c/core/log',
	cwd + '/Micro-XRCE-DDS-Client/src/c/core/serialization',
	cwd + '/Micro-XRCE-DDS-Client/src/c/core/session',
	cwd + '/Micro-XRCE-DDS-Client/src/c/core/session/stream',
	cwd + '/Micro-XRCE-DDS-Client/src/c/profile/transport/serial',
	cwd + '/Micro-XRCE-DDS-Client/src/c/util',
	cwd + '/Micro-XRCE-DDS-Client/include',
	cwd + '/Micro-CDR/src/c',
	cwd + '/Micro-CDR/include',
	# Example Header
	cwd + '/Micro-XRCE-DDS-Client/examples/PingPong']

group = DefineGroup('Micro-XRCE-DDS-Client', src, depend = [''], LOCAL_CPPPATH = LOCAL_CPPPATH, CPPPATH = LOCAL_CPPPATH)

Return('group')
